<?php
header("Content-type: text/html; charset=utf-8");
ini_set('display_errors', 1);
error_reporting(E_ALL);
require('cls_duphp.php');
//配置数据库
$x=new duphpAdmin('localhost','root','123321','duphp');
$x->SetTable('test')->SetFieldsInList('ID,name,pic')->SetFieldsInModify('ID,name,pic,intro')->SetFunction('pic','ShowImg')->DoForAll();


//自定义
function ShowImg($name){
	return $name==''?'无':sprintf('<img src="%s" />',$name);
}
?>